<%@page import="com.zhuoshi.dao.CustomerDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String id = request.getParameter("id");
	CustomerDao dao = new CustomerDao();
	int rows = 0;
	rows = dao.delete(Integer.parseInt(id));
	if (rows > 0) {
		out.print("<script language='javascript'>alert('删除成功！');</script>");
	} else {
		out.print("删除失败!");
	}
%>
<input type="button" value="关闭并返回" id="transmit" />
<script type="text/javascript" src="template/jquery.min.js"></script> 
<script type="text/javascript" src="template/H-ui.admin.js"></script> 
 <script type="text/javascript">
    $('#transmit').on('click', function(){
        //刷新页面
        parent.window.location.href='customerlist.jsp';
        //获取窗口索引
        var index = parent.layer.getFrameIndex(window.name);
        //关闭弹出层
        parent.layer.close(index);
    });
</script>